import java.util.ArrayList;
import java.util.PriorityQueue;
import java.util.Scanner;

public class TreeNode {

    public static void main(String[] args) {
        int max = -1;
        int start = 0;
        int end = 0;
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int a = 0;
        int b = 0;
        while(end < str.length()){
            while(start < str.length() && (str.charAt(start) < '0' || str.charAt(start) > '9')){
                start++;
            }
            end = start;
            while(end < str.length() && str.charAt(end) >= '0' && str.charAt(end) <= '9'){
                if(end - start > max){
                    max = start - end;
                    a = start; b = end;
                }
                end++;
            }
            start = end;
        }
        System.out.println(str.substring(a, b + 1));
    }

    public static int amount = 0;

    public static void sum(TreeNode root, int sum){
        if(root == null){
            return;
        }
        if(root.left == null && root.right == null){
            amount = sum * 10 + root.val;
            return;
        }
        sum = sum * 10 + root.val;
        sum(root.left, sum);//
        sum(root.right, sum);

    }

//    public static void main(String[] args) {
////        System.out.println(new ArrayList<ArrayList<Integer>>());
////        PriorityQueue<TrreNode> queue = new PriorityQueue<TrreNode>();
////        queue.add();
////        queue.poll();//
//        solve("456", "77");
//    }

    public static String solve (String s, String t) {
        if(s == null || s.equals("") || s.equals("0")) return t;
        if(t == null || t.equals("") || t.equals("0")) return s;
        int lens = s.length(), lent = t.length();
        int indexs = 0, indext = 0;
        while(indexs < lens && s.charAt(indexs) == '0'){
            indexs++;
        }
        while(indext < lent && t.charAt(indext) == '0'){
            indext++;
        }
        if(indexs == lens) return t;
        if(indext == lent) return s;
        StringBuilder str = new StringBuilder();
        StringBuilder s1 = new StringBuilder(s.substring(indexs)).reverse();
        StringBuilder t1 = new StringBuilder(t.substring(indext)).reverse();
        int num = 0, i = 0;
        while(i != lens && i != lent){
            num += s1.charAt(i) + t1.charAt(i) - '0' - '0';
            str.append(num % 10);
            num /= 10;
            i++;
        }
        if(i == lens){
            while(i != lent){
                num += t1.charAt(i) - '0';
                str.append(num % 10);
                num /= 10;
                i++;
            }
        }else{
            while(i != lens){
                num += s.charAt(i) - '0';
                str.append(num % 10);
                num /= 10;//
                i++;
            }
        }
        if(num != 0) str.append(num);
        return str.reverse().toString();
    }

    public int val;
    public TreeNode left;
    public TreeNode right;

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public TreeNode getLeft() {
        return left;
    }

    public void setLeft(TreeNode left) {
        this.left = left;
    }

    public TreeNode getRight() {
        return right;
    }

    public void setRight(TreeNode right) {
        this.right = right;
    }
}
